using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmStockMovement")]
    public class StockMovement
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "StockMovementId", ResourceType = typeof(Resources.StockMovementResource))]
        public int StockMovementId { get; set; }

		[DataMember, Display(Name = "MovementCode", ResourceType = typeof(Resources.StockMovementResource))]
        public string MovementCode { get; set; }

		[DataMember, Display(Name = "RequisitonDesItem", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<int> RequisitonDesItem { get; set; }

        [ForeignKey("Receive")]
		[DataMember, Display(Name = "ReceiveId", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<int> ReceiveId { get; set; }

		[ForeignKey("ToJobSite")]
		[DataMember, Display(Name = "ToJobSiteId", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<int> ToJobSiteId { get; set; }

		[ForeignKey("ResItem")]
		[DataMember, Display(Name = "ResItemId", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<int> ResItemId { get; set; }

		[DataMember, Display(Name = "RequestQuantity", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<double> RequestQuantity { get; set; }

		[DataMember, Display(Name = "CutstockRealQuantity", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<double> CutstockRealQuantity { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.StockMovementResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        public virtual Received Receive { get; set; }

		public virtual HRM.JobSite ToJobSite { get; set; }

		public virtual ICM.MasResourceGroup ResItem { get; set; }

    }
}